
package com.be.beadmin.service.repository;

import com.be.beadmin.service.entity.NotifyTemplateInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

/**
* @author ljh
* @date 2023-09-20
**/
public interface NotifyTemplateInfoRepository extends JpaRepository<NotifyTemplateInfo, String>, JpaSpecificationExecutor<NotifyTemplateInfo> {

    NotifyTemplateInfo findNotifyTemplateInfoByIdAndDelete(String id, Integer delete);

    NotifyTemplateInfo findNotifyTemplateInfoById(String id);

    List<NotifyTemplateInfo> findNotifyTemplateInfoByReceiverNameAndDeleteAndStatusLessThan(String username, int delete, int status);

    List<NotifyTemplateInfo> findNotifyTemplateInfoByReceiverNameAndStatusAndNotifyTypeAndDelete(String userName, int status, String notifyType, int delete);

    void deleteByIdIn(List<String> ids);

    List<NotifyTemplateInfo> findNotifyTemplateInfoByReceiverNameAndStatusAndDelete(String userName, int status, int delete);
}